#define  _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    double myPow(double x, int n) {
        if (n == 0) return 1;
        if (n < 0)
        {
            if (n == INT_MIN)
            {
                double ret = myPow(x, -(INT_MIN >> 1));
                return 1 / ret / ret;
            }
            return 1 / myPow(x, -n);
        }
        double ret = myPow(x, n >> 1);
        return (n & 1) ? ret * ret * x : ret * ret;
    }
};